package org.geektimes.configuration.micro.config.source;

import org.eclipse.microprofile.config.spi.ConfigSource;

import java.util.Comparator;

public class ConfigSourceComparator implements Comparator<ConfigSource> {
    public static final Comparator INSTANCE = new ConfigSourceComparator();

    private ConfigSourceComparator() {
    }

    @Override
    public int compare(ConfigSource o1, ConfigSource o2) {
        return Integer.compare(o2.getOrdinal(),o1.getOrdinal());
    }
}
